﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyHealthOnline.Business;
using MyHealthOnline.Dal.Generated.CollectionClasses;

namespace MyHealthOnline.Specialist
{
    public partial class FutureWeeks : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ucFutureConsultations.SetGrid(FutureConsults);
            }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int nr = 0;
            var patientList = ConsultBusiness.FilterConsults(FutureConsults, txtSearchPatient.Text);

            ucFutureConsultations.SetGrid(patientList);
        }

        private static ConsultCollection FutureConsults
        {
            get
            {
                return ConsultBusiness.GetFutureConsults();
            }
        }
      
    }
}